//
//  Score.m
//  z_boxem
//
//  Created by A B on 2/8/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "Score.h"

@implementation Score
@synthesize playerName;
@synthesize score;
@synthesize level;

-(void) encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeObject:playerName forKey:@"playersName"];
    [aCoder encodeObject:score forKey:@"score"];
    [aCoder encodeObject:level forKey:@"level"];
}

-(id) initWithCoder:(NSCoder *)aDecoder{
    if((self = [super init])){
        [self setScore: [aDecoder decodeObjectForKey:@"score"]];
        [self setPlayerName: [aDecoder decodeObjectForKey:@"playersName"]];
        [self setLevel: [aDecoder decodeObjectForKey:@"level"]];
    }
    return self;
}

@end
